import request from '@/utils/request'
import qs from 'qs'

export function login(data) {
  return request({
    url: '/user/login',
    // url: '/vue-element-admin/user/login',
    method: 'post',
    data:qs.stringify(data)
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    // url: '/vue-element-admin/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout(token) {
  return request({
    url: '/user/logout',
    // url: '/vue-element-admin/user/logout',
    method: 'post',
    data:qs.stringify({token})
  })
}
